x86/mm: Use mfn_eq()/mfn_add() rather than opencoded variations
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 1 Jun 2018 11:56:09 +0000 (12:56 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 28 Aug 2018 17:42:17 +0000 (18:42 +0100)
commit3f56004f890ced1ddf7c861910ef8e7783764476
tree7130f46ce04d70d76dc13d2a5a5fc3feca514c7c
parent566882ee4ec6d8c75c3f471b05baf65852516c45
x86/mm: Use mfn_eq()/mfn_add() rather than opencoded variations

Use l1e_get_mfn() in place of l1e_get_pfn() when applicable, and fix up style
on affected lines.

For sh_remove_shadow_via_pointer(), map_domain_page() is guaranteed to succeed
so there is no need to ASSERT() its success.  This allows the pointer
arithmetic to folded into the previous expression, and for vaddr to be
properly typed as l1_pgentry_t, avoiding the cast in l1e_get_mfn().

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/cpu/mcheck/vmce.c
xen/arch/x86/domain_page.c
xen/arch/x86/mm/hap/hap.c
xen/arch/x86/mm/mem_sharing.c
xen/arch/x86/mm/p2m-pod.c
xen/arch/x86/mm/p2m.c
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/multi.c